<?php

namespace app\model\other;

use app\model\user\User;
use crmeb\basic\BaseModel;
use crmeb\traits\ModelTrait;

class UploadRecord extends BaseModel
{
    use ModelTrait;

    /**
     * 数据表主键
     * @var string
     */
    protected $pk = 'id';

    /**
     * 模型名称
     * @var string
     */
    protected $name = 'upload_record';


    /**
     * @return \think\model\relation\HasOne
     * 订单用户关联
     */
    public function user()
    {
        return $this->hasOne(User::class, 'uploader', 'uid')->bind(['nickname']);;
    }
}